package view;

import java.util.Observable;
import java.util.Observer;

import javax.swing.JPanel;

import model.Perspective;

@SuppressWarnings("serial")
public abstract class BaseView extends JPanel implements Observer  {
	
	protected Perspective perspective;
	
	public BaseView(){
		init();
	}
	
	protected abstract void init();
	protected abstract void update(Perspective p);
	
    public void update(Observable arg0, Object arg1) 
    {
        if((arg0 == null) || (arg0.getClass() != Perspective.class)) return;
        perspective = (Perspective) arg0;
        update(perspective);
    }
}
